package com.motos;

public final class  Car extends Moto {
    private String type;

    public Car() {
        super();
    }

    public Car(String no, String type, String color) {
        this.setNo(no);
        this.setColor(color);
        this.type=type;
        if(type.equals("宝马")){
            this.setPrice(500);
        }
        else
            super.setPrice(300);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
        if (type.equals("宝马")) {
            this.setPrice(500);
        }else
            this.setPrice(300);
    }

    public String toString(){
        return this.getNo()+"\t"+this.type+"\t"+this.getColor()+"\t"+this.getPrice();

    }
    public double calcRent(int days){
        return getPrice()*days;
    }
    public void navigate(){
        System.out.println("导航已经实现");
    }
    public void blueTooth() {
        System.out.println("蓝牙已经实现");
    }
}
